package com.ruoyi.web.controller.buy;

import com.ruoyi.buy.domain.entity.Inv0004New.Inv0004NewDto;
import com.ruoyi.buy.domain.entity.buy0005.Buy0005InvDataDto;
import com.ruoyi.buy.domain.entity.buy0005.Buy0005PostDataDto;
import com.ruoyi.buy.service.IInv0004NewService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 角色信息
 * 
 * @author ruoyi
 */
@RestController
@Transactional(rollbackFor = Exception.class)
@RequestMapping("/buy0005")
public class buy0005Controller extends BaseController {
    @Autowired
    private IInv0004NewService iInv0004NewService;


    /**
     * 查询库存信息列表
     */
    @GetMapping("/list")
    public TableDataInfo list(Inv0004NewDto inv0004NewDto)
    {
        startPage();
        List<Inv0004NewDto> list = iInv0004NewService.selectInv0004NewBillList1(inv0004NewDto);
        return getDataTable(list);
    }

    @PostMapping("/getPostData")
    public AjaxResult getPostData(@RequestBody Buy0005PostDataDto para)
    {
        List<Buy0005PostDataDto> list = iInv0004NewService.getPostData(para);
        return success(list);
    }

    @PostMapping("/getInvData")
    public AjaxResult getInvData(@RequestBody Buy0005InvDataDto para)
    {
        List<Buy0005InvDataDto> list = iInv0004NewService.getInvData(para);
        return success(list);
    }

}
